package com.tencent.welink.api.space.alarm;

import com.tencent.welink.api.OpenApiTokenChange;
import com.tencent.welink.api.base.WelinkOpenApi;
import com.tencent.welink.config.BussinessConfig;
import com.tencent.welink.util.CrontabUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Map;

/**
 * @Description: 10. 获取收敛的告警列表
 * @Author: limye
 * @CreateDate: 2020-6-16
 * @Version: V1.0
 */
public class GetConvergenceAlarmList extends WelinkOpenApi {

    private static final Logger log = LogManager.getLogger(GetConvergenceAlarmList.class);

    public GetConvergenceAlarmList(){
        super("/space/datahub/alarm/v0.1/getConvergenceAlarmList",true);
    }


    @Override
    public void displayResult(String result) {
    }


    public static void main(String[] args) {
        new BussinessConfig();
        CrontabUtil.addTaskInRate(new OpenApiTokenChange(), BussinessConfig.loginDurationMinutes,true);

        //实例化对象
        GetConvergenceAlarmList instance = new GetConvergenceAlarmList();

        /**
         * 参数名	参数类型	说明	是否必填
         * token	String	鉴权token	是
         * id	String	告警id	是
         * page	int	页码，默认1	否
         * size	int	每页数量，默认10，最大100	否
         */
        //添加参数
        Map<String,Object> map = instance.getExtendsPara();
        map.put("id","123");

        //执行HTTP请求及展示结果
        instance.DoHttp();
        CrontabUtil.shutdown();

    }
}
